<template>
  <div>
    test

    <el-button @click="btnClick">子获取父实例</el-button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      num: 1
    }
  },
  methods: {
    btnClick() {
      console.log(this.$root)
      //   this.$parent.getData()
      //   console.log(this.$parent.msg)
    }
  }
}
</script>
<style></style>
